import request from '@/plugin/axios'

export function withdrawable (params) {
  return request({
    url: '/shopStatement/withdrawable',
    method: 'get',
    params
  })
}

export function getBalance (data) {
  return request({
    url: '/shopStatement/balance',
    method: 'get',
    params: data
  })
}

// 收入支出列表
export function billList (params) {
  return request({
    url: '/shopStatement/list',
    method: 'get',
    params
  })
}

export function updateShop (data) {
  return request({
    url: '/microprogram/shop',
    method: 'put',
    data
  })
}

export function getShopInfo () {
  return request({
    url: '/microprogram/shop',
    method: 'get'
  })
}

// 退换货规则列表
export function tuihhgzList (data) {
  return request({
    url: '/aftersaleConf/list',
    method: 'get',
    params: data
  })
}

export function tuihhgz_createOrEdit (data) {
  return request({
    url: '/aftersaleConf/save',
    method: 'post',
    data
  })
}

export function tuihhgz_del (data) {
  return request({
    url: '/aftersaleConf/del/' + data + "/1",
    method: 'get'
  })
}

export function getFreight () {
  return request({
    url: '/freight',
    method: 'get'
  })
}

export function saveFreight (data) {
  return request({
    url: '/freight/save',
    method: 'post',
    data
  })
}

export function getVisitorList () {
  return request({
    url: '/microprogram/getVisitorList',
    method: 'get'
  })
}

export function shopQrImage (data) {
  return request({
    url: '/inner/wxacodeunlimit',
    method: 'post',
    data
  })
}